Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CRAG print bypasses stripInvalidThinkingBlocks, so a history thinking block with an empty signature (e.g. carried over from a relay that never signs) went upstream verbatim and drew 400 "Invalid `signature` in `thinking` block" on every turn. Drop blocks without a usable signature; signed blocks untouched.
panjinhe
force-pushed
the
fix/crag-drop-unsigned-thinking
branch
from
November 16, 2026 05:30
cb345ad to
acf63dd
Compare
Owner
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
CRAG print 路径(
prepareCragPrintBody)不经过stripInvalidThinkingBlocks,历史里的 thinking 块会原样交给 CRAG 重放。如果历史里有signature: ""的 thinking 块,上游每轮都返回 400:x-stainless-retry-count: 1)。每轮多一次失败、多约 4s,面板里全是 400。stripInvalidThinkingBlocks丢掉空签名块,不受影响。改动
prepareCragPrintBody开头调用新的dropUnsignedHistoryThinking:thinking块(空、短于 24、dummy,复用hasUsableThinkingSignature)直接删掉,和 Claude Code 自己重试时的做法一致。thinking和redacted_thinking一律不动(CRAG 内核会对已发出的流做指纹,不能改写)。验证
test/unit/crag-print-prompt.test.mjs、anthropic-policy.test.mjs、thinking-owner.test.mjs:76/76 通过;新增 2 个用例。npm run test:unit:7/379 个文件失败,和干净的upstream/main(ab51de06)完全相同(授权 / 激活相关),与本改动无关。biome format通过。